Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

TipeeeStream implementation #12

Closed
wants to merge 1 commit into from
Closed

TipeeeStream implementation #12

wants to merge 1 commit into from

Conversation

daullmer
Copy link
Contributor

Added basic TipeeeStream implementation for incoming events

Current supported events:

  • Donation
  • Subscription
  • Follow

@J0B10
Copy link
Member

J0B10 commented May 27, 2019

I did waste the last 2 hours trying to connect to the tipeeestream socket und just rage quitted.
And here you come telling me that you just finished a implementation just a few seconds later.
Seems like the universe is trolling me today 🙈 😅 .

Looking at your pr it seems like I just had the wrong url, I tried connecting to https://sso.tipeeestream.com:8443 (I found it here).

So thanks a lot for your pr, I'll later take some more time for a propper review.

Copy link
Member

@J0B10 J0B10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your PR is looking pretty good, I couldn't find any real problems. 😃👍

I just highlighted some smaller things I'dd do in a different way

private val eventHandler = ListBuffer[Consumer[TipeeeStreamEvent]]()
private val apiKey = "apiKey"
private val username = "username"
override protected var requiredCredentialKeys: List[String] = List(apiKey, username)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must this username be the username of the tipeestream user or can it be anything?
If it can be anything wouldn't it be better to use the chatoverflow- + the source identifier rather than having to specify a username each time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it has to be the tipeeestream username. If we can trust the docs 😆 Let's just try if it is necessary

override protected var optionalCredentialKeys: List[String] = List()
private var socket: Socket = _
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to have an empty optional here for two reasons:

  1. Eliminating null values from the code (this prevents a lot of trouble in general, altought in this special case it isn't a problem)
  2. Consistency with other services (just have a look how it is done in DiscordConnector )


import scala.collection.mutable.ListBuffer

class TipeeeStreamListener {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't used anywhere. Just remove it.

@J0B10
Copy link
Member

J0B10 commented May 27, 2019

Are you planning to also implement the Rest API and more specific stuff like providers?
If so I stop working on tipeeestram and spend my time on other stuff, if not I'dd love to build upon your work.

@daullmer
Copy link
Contributor Author

I did waste the last 2 hours trying to connect to the tipeeestream socket und just rage quitted.
And here you come telling me that you just finished a implementation just a few seconds later.
Seems like the universe is trolling me today .

Looking at your pr it seems like I just had the wrong url, I tried connecting to https://sso.tipeeestream.com:8443 (I found it here).

So thanks a lot for your pr, I'll later take some more time for a propper review.

Yeah finding the url was like the hardest part 😅 . After realizing the url in the docs doesn't work, I wrote an email to the support. They provided me with the following url: https://api.tipeeestream.com/v2.0/site/socket. Maybe the url for the Socket.io API changes from time to time and we have to make a REST call to get the current url. For now, I just hard coded it.

Are you planning to also implement the Rest API and more specific stuff like providers?
If so I stop working on tipeeestram and spend my time on other stuff, if not I'dd love to build upon your work.

I think I find time tomorrow to look into the changes you suggested. After that, I am not planning on implementing the different providers and the Rest API. You are free to work on it.

@J0B10
Copy link
Member

J0B10 commented May 27, 2019

I just don't get why they don't update their api documentation...
The API that you got from the support implies that there even is a versuion 2.0 of the api that is documented nowhere...

I think I find time tomorrow to look into the changes you suggested. After that, I am not planning on implementing the different providers and the Rest API. You are free to work on it.

Then I'll just create a new tipeestream branch on the main repo based on your pr where I continue to work on tipeeestream and merge it once I'm finished.
I can then also do these changes (if reequired) myself quickly.

Are you on our discord server? I'd love to give you the contributor role^^

@J0B10 J0B10 closed this May 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants